#被动技能【辟邪剑法】
execute as @a[tag=meiqin,scores={skPlayer=1..}] if data entity @s {SelectedItem:{id:"minecraft:stone_sword"}} at @s rotated ~ 0 positioned ^ ^ ^4 run particle minecraft:smoke ~ ~ ~ 1.5 1 1.5 0.01 5 normal @a


execute if entity @a[tag=BossAlready] as @a[tag=meiqin,scores={skPlayer=1..}] if data entity @s {SelectedItem:{id:"minecraft:stone_sword"}} at @s rotated ~ 0 positioned ^ ^ ^4 run effect give @e[team=!VSBOSS,distance=0..3.9,gamemode=!spectator] wither 2 0
execute if entity @a[tag=BossAlready] as @a[tag=meiqin,scores={skPlayer=1..}] if data entity @s {SelectedItem:{id:"minecraft:stone_sword"}} at @s rotated ~ 0 positioned ^ ^ ^4 run effect give @e[team=!VSBOSS,distance=0..3.9,gamemode=!spectator] slowness 2 0


execute unless entity @a[tag=BossAlready] as @a[tag=meiqin,scores={skPlayer=1..}] if data entity @s {SelectedItem:{id:"minecraft:stone_sword"}} at @s rotated ~ 0 positioned ^ ^ ^4 run effect give @e[distance=0..3.9,gamemode=!spectator] wither 2 0
execute unless entity @a[tag=BossAlready] as @a[tag=meiqin,scores={skPlayer=1..}] if data entity @s {SelectedItem:{id:"minecraft:stone_sword"}} at @s rotated ~ 0 positioned ^ ^ ^4 run effect give @e[distance=0..3.9,gamemode=!spectator] slowness 2 0
execute as @a[tag=meiqin,scores={skPlayer=1..,skPearl=2..}] if data entity @s {SelectedItem:{id:"minecraft:stone_sword"}} run scoreboard players remove @s skPlayer 1
execute as @a[tag=meiqin,scores={skPlayer=1..,skPearl=2..}] if data entity @s {SelectedItem:{id:"minecraft:stone_sword"}} run scoreboard players reset @s skPearl

#被动技能【铁砂风暴】
execute as @a[tag=meiqin,scores={skStone_sword1=1..}] at @s run function nw:yingxiong/2yingxiong/06dianjishi/skill/0tiesha

#被动技能【聚离反应】
execute as @a[tag=meiqin,scores={skPlayer=15..,skCDPearl=0}] at @s run function nw:yingxiong/2yingxiong/06dianjishi/skill/0julifanying

#主动技能【落雷】
execute as @a[tag=meiqin,scores={skEgg=1..}] at @s run function nw:yingxiong/2yingxiong/06dianjishi/skill/1luolei
#主动技能【落雷】特效
execute at @a[tag=meiqin,scores={skCDPlayer1=3..}] positioned ^ ^0.3 ^3 run particle composter ~ ~ ~ 0.1 0.1 0.1 0.01 2 normal @a
execute at @a[tag=meiqin,scores={skCDPlayer1=3..}] positioned ^ ^0.6 ^5 run particle composter ~ ~ ~ 0.2 0.1 0.2 0.01 2 normal @a
execute at @a[tag=meiqin,scores={skCDPlayer1=3..}] positioned ^ ^0.9 ^7 run particle composter ~ ~ ~ 0.3 0.1 0.3 0.01 2 normal @a
execute at @a[tag=meiqin,scores={skCDPlayer1=3..}] positioned ^ ^1.2 ^9 run particle composter ~ ~ ~ 0.5 0.1 0.5 0.01 5 normal @a
execute at @a[tag=meiqin,scores={skCDPlayer1=3..}] positioned ^ ^1.2 ^10 run particle minecraft:enchant ~ ~ ~ 0.5 0.1 0.5 0.01 5 normal @a
#主动技能【落雷】一段落雷
execute as @a[tag=meiqin,scores={skCDPlayer1=6}] at @s positioned ^ ^1 ^11 run summon minecraft:lightning_bolt ~ ~ ~
scoreboard players set @a[tag=meiqin,scores={skCDPlayer1=6}] skCDPlayer1 5
#主动技能【落雷】二段落雷
execute as @a[tag=meiqin,scores={skCDPlayer1=3}] at @s positioned ^ ^1 ^11 run summon minecraft:lightning_bolt ~ ~ ~
scoreboard players set @a[tag=meiqin,scores={skCDPlayer1=3}] skCDPlayer1 2
#主动技能【落雷】CD
execute as @a[tag=meiqin,scores={skPlayer=20..,skCDEgg=0}] run function nw:yingxiong/2yingxiong/06dianjishi/skill/1luolei_cd

#主动技能【lv5max.超电磁炮】
execute as @a[tag=meiqin,scores={skEXBottle=1..}] at @s run function nw:yingxiong/2yingxiong/06dianjishi/skill/2diancipao
#主动技能【lv5max.超电磁炮】CD
execute as @a[tag=meiqin,scores={skPlayer=30..,skCDEXBottle=0}] run function nw:yingxiong/2yingxiong/06dianjishi/skill/2diancipao_cd

#被动技能【电磁雷达】
execute as @a[tag=meiqin] run scoreboard players remove @s skCDKe 2
execute as @a[tag=meiqin,scores={skPlayer=10..,skCDKe=..0}] at @s run function nw:yingxiong/2yingxiong/06dianjishi/skill/3dianci
execute as @a[tag=meiqin,scores={skCDKe=..0}] run scoreboard players set @s skCDKe 0

#被动技能【粒子能力系-电击使】
execute as @a[tag=meiqin,scores={skPlayer=..99,skCDPlayer=1}] at @s if entity @a[distance=1..10,gamemode=!spectator] run scoreboard players add @s skPlayer 2
scoreboard players add @a[tag=meiqin,scores={skPlayer=..99,skCDPlayer=1..}] skPlayer 1
scoreboard players add @a[tag=meiqin,scores={skCDPlayer=1..}] skPearl 1
scoreboard players reset @a[tag=meiqin,scores={skCDPlayer=1..}] skCDPlayer
execute as @a[tag=meiqin,scores={skPlayer=100..}] run scoreboard players set @s skPlayer 100

execute as @a[tag=meiqin] run title @s actionbar [{"text":"聚离反应","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDPearl","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 落雷","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEgg","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 超电磁炮","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEXBottle","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 电磁雷达","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDKe","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"tick","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 脑阈值 ","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skPlayer","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"%","color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"/","color":"dark_red","bold":true,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"100%","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
